const fs = require('fs')

let rs = fs.createReadStream('./观书有感.txt');
let ws = fs.createWriteStream('./观书有感2.txt');
rs.on('data',data =>{
    console.log(data);
    ws.write(data);
})
rs.on('end',()=>{
    console.log('复制成功');
    rs.close();
    ws.close();
})